<?php
class galery_view extends SClass {

    public function process() {
        $user = $this->getUserSecure();
        if ($user) {
            if ($user->getLevel() >= 1) {
        	   $this->assign('autorized', 1);
            }
        }
    
       $post = ServiceUtils::GetFactory()->getAlbumService()->getAlbumsAll();
        $a = array();
        while ($x = $post->getNext()) {
            $a[] = array(
                'id' => $x->getId(),
                'title' => $x->getTitle(),
                'picURL' => $x->getURL(),
                
                /*'url' => Engine_LinkMaker::GetURLByContentID('gallery_album_view',
                    $x->getId()),
                'urledit' => Engine_LinkMaker::GetURLByContentID('gallery_album_edit',
                    $x->getId()),
                'urldelete' => Engine_LinkMaker::GetURLByContentID('gallery_album_delete',
                    $x->getId()),*/
            );
        }
        $this->assign('postArray', $a);
    }
  
}